#!/usr/bin/env node
const input = JSON.parse(require('fs').readFileSync(0, 'utf-8'));
const lastMessageTs = parseInt(input.taskResume?.previousState?.lastMessageTs || '0');
const now = Date.now();
const hoursAgo = Math.floor((now - lastMessageTs) / 3600000);

console.log(JSON.stringify({
  cancel: false,
  contextModification: hoursAgo >= 1
    ? `TASK_CONTEXT: Task was paused ${hoursAgo} hours ago - you may need to re-familiarize yourself with the context`
    : "",
  errorMessage: ""
}));
